sub SetMinTrivial(string trivialtoset)
/declare local_i int local
/echo ${trivialtoset.Length} ${trivialtoset}
/notify TradeSkillWnd COMBW_MinTrivialEdit leftmouse
/for local_i 1 to 10
/keypress backspace chat
/keypress delete chat
/next local_i
/for local_i 1 to ${trivialtoset.Length}
/shiftkey /keypress ${trivialtoset.Mid[${local_i},1]} chat
/next local_i
/return

Sub Experiment
/echo recipe.inc : Experiment
/if (${Window[TradeSkillWnd].Open}) /nomodkey /notify TradeSkillWnd COMBW_ExperimentButton leftmouseup
/return

sub SetItemName(ItemName)
/echo recipe.inc ${ItemName}
/declare local_i int local
/nomodkey /notify TradeSkillWnd COMBW_SearchTextEdit leftmouse
/for local_i 1 to ${ItemName.Length}
|/echo /keypress ${ItemName.Mid[${local_i},1]} chat
/if (${ItemName.Mid[${local_i},1].Equal[ ]}) {
/keypress space chat
|you want to comment after the next } if you play on a "normal" qwerty keyboard
} else /if (${ItemName.Mid[${local_i},1].Equal[m]}) {
/keypress ; chat
} else /if (${ItemName.Mid[${local_i},1].Equal[a]}) {
/keypress q chat
} else /if (${ItemName.Mid[${local_i},1].Equal[z]}) {
/keypress w chat
} else /if (${ItemName.Mid[${local_i},1].Equal[q]}) {
/keypress a chat
} else /if (${ItemName.Mid[${local_i},1].Equal[w]}) {
/keypress z chat
} else /if (${ItemName.Mid[${local_i},1].Equal[-]}) {
/keypress 6 chat
} else /if (${ItemName.Mid[${local_i},1].Equal[']}) {
/keypress 4 chat
} else /if (${ItemName.Mid[${local_i},1].Equal[.]}) {
/shiftkey /keypress , chat
} else /if (${ItemName.Mid[${local_i},1].Equal[(]}) {
/keypress 5 chat
} else /if (${ItemName.Mid[${local_i},1].Equal[)]}) {
/keypress - chat
} else /if (${ItemName.Mid[${local_i},1].Equal[:]}) {
/keypress . chat
|end of comment if needed....
} else {
/keypress ${ItemName.Mid[${local_i},1]} chat
}
/next local_i
/return

sub SetMaxTrivial(string trivialtoset)
/declare local_i int local
/notify TradeSkillWnd COMBW_MaxTrivialEdit leftmouse
/for local_i 1 to 10
/keypress backspace chat
/keypress delete chat
/next local_i
/for local_i 1 to ${trivialtoset.Length}
/shiftkey /keypress ${trivialtoset.Mid[${local_i},1]} chat
/next local_i
/return

sub MakeQuery
/delay  5s ${Window[TradeSkillWnd].Child[COMBW_LeftSideArea].Child[COMBW_SearchArea].Child[COMBW_SearchButton].Enabled}
/if (!${Window[TradeSkillWnd].Child[COMBW_LeftSideArea].Child[COMBW_SearchArea].Child[COMBW_SearchButton].Enabled}) {
    /echo TS_SearchButton NOT enabled
    /return
}
/nomodkey /notify TradeSkillWnd COMBW_SearchButton leftmouseup
/delay  5s
/echo done
/return

sub GetItemNameFromListIndex(int ginfli_index)
/return ${Window[TradeSkillWnd].Child[COMBW_LeftSideArea].Child[COMBW_RecipeListArea].Child[COMBW_RecipeList].List[${ginfli_index}]}

sub GetItemTrivialFromListIndex(int ginfli_index)
/return ${Window[TradeSkillWnd].Child[COMBW_LeftSideArea].Child[COMBW_RecipeListArea].Child[COMBW_RecipeList].List[${ginfli_index},2]}